package com.linkhub.oms.admin.modules.logistic.freighttemplate.domain.vo;

import com.linkhub.oms.entity.LogisticFreightTemplateDetailEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 物流运费模板详情VO
 * </p>
 *
 * @author Frank
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "物流运费模板详情VO_重量范围", description = "物流运费模板详情VO_重量范围")
@NoArgsConstructor
public class FreightTemplateDetailVO implements Serializable {

    @ApiModelProperty(value = "主键，更新时需要传")
    private Long id;

    @ApiModelProperty(value = "模板主表id（t_logistic_freight_template）", hidden = true)
    private Long logisticFreightTemplateId;

    @ApiModelProperty(value = "起始重量")
    private BigDecimal startingWeight;

    @ApiModelProperty(value = "截止重量")
    private BigDecimal endingWeight;

    @ApiModelProperty(value = "对外运费")
    private BigDecimal externalFreight;

    @ApiModelProperty(value = "实际运费，币种=实际费用币种")
    private BigDecimal actualFreight;

    @ApiModelProperty(value = "对外挂号费")
    private BigDecimal externalRegistrationFee;

    @ApiModelProperty(value = "实际挂号费，币种=实际费用币种")
    private BigDecimal actualRegistrationFee;

    public FreightTemplateDetailVO(LogisticFreightTemplateDetailEntity detailEntity) {
        this.id = detailEntity.getId();
        this.logisticFreightTemplateId = detailEntity.getLogisticFreightTemplateId();
        this.startingWeight = detailEntity.getStartingWeight();
        this.endingWeight = detailEntity.getEndingWeight();
        this.externalFreight = detailEntity.getExternalFreight();
        this.actualFreight = detailEntity.getActualFreight();
        this.externalRegistrationFee = detailEntity.getExternalRegistrationFee();
        this.actualRegistrationFee = detailEntity.getActualRegistrationFee();
    }
}
